home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / binutils.7 / binutils / binutils-2.7 / etc / configure.info-2 < prev    next >
Encoding:
GNU Info File  |  1996-07-15  |  26.9 KB  |  573 lines

  1. This is Info file configure.info, produced by Makeinfo-1.55 from the
  2. input file ./configure.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * configure: (configure).        Cygnus configure.
  6. END-INFO-DIR-ENTRY
  7.  
  8.    This document describes the Cygnus Support version of `configure'.
  9.  
  10.    Copyright (C) 1991, 1992, 1993 Cygnus Support Permission is granted
  11. to make and distribute verbatim copies of this manual provided the
  12. copyright notice and this permission notice are preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided that
  16. the entire resulting derived work is distributed under the terms of a
  17. permission notice identical to this one.
  18.  
  19.    Permission is granted to copy and distribute translations of this
  20. manual into another language, under the above conditions for modified
  21. versions, except that this permission notice may be stated in a
  22. translation approved by Cygnus Support.
  23.  
  24. 
  25. File: configure.info,  Node: Makefile fragments,  Next: Makefile extensions,  Prev: Target,  Up: Using configure
  26.  
  27. Adding information about local conventions
  28. ==========================================
  29.  
  30.    If you find that a tool does not get configured to your liking, or if
  31. `configure''s conventions differ from your local conventions, you should
  32. probably consider "site-specific `Makefile' fragments".  See also *Note
  33. Adding site info: Sites.
  34.  
  35.    These are probably not the right choice for options that can be set
  36. from the `configure' command line or for differences that are host or
  37. target dependent.
  38.  
  39.    Cygnus `configure' uses three types of `Makefile' fragments.  In a
  40. generated `Makefile' they appear in the order: "target fragment", "host
  41. fragment", and "site fragment".  This allows host fragments to override
  42. target fragments, and site fragments to override both.
  43.  
  44.    Host-specific `Makefile' fragments conventionally reside in the
  45. `./config/' subdirectory with names of the form `mh-HOSTTYPE'.  They
  46. are used for hosts that require odd options to the standard compiler and
  47. for compile time options based on the host configuration.
  48.  
  49.    Target-specific `Makefile' fragments conventionally reside in the
  50. `./config/' subdirectory with names of the form `mt-TARGET'.  They are
  51. used for target dependent compile time options.
  52.  
  53.    Site specific `Makefile' fragments conventionally reside in the
  54. `./config/' subdirectory with names of the form `ms-SITE'.  They are
  55. used to override host- and target-independent compile time options.
  56. Note that you can also override these options on the `make' invocation
  57. line.
  58.  
  59. 
  60. File: configure.info,  Node: Makefile extensions,  Prev: Makefile fragments,  Up: Using configure
  61.  
  62. Extensions to the GNU coding standards
  63. ======================================
  64.  
  65.    The following additions to the GNU coding standards are required for
  66. Cygnus `configure' to work properly.
  67.  
  68.    * The `Makefile' must contain exactly one line starting with `####'.
  69.      This line should follow any default macro definitions but precede
  70.      any rules.  Host, target, and site-specific `Makefile' fragments
  71.      will be inserted immediately after this line.  If the line is
  72.      missing, the fragments will not be inserted.
  73.  
  74.    * Cygnus adds the following targets to each `Makefile'.  Their
  75.      existence is not required for Cygnus `configure', but they are
  76.      documented here for completeness.
  77.  
  78.     `info'
  79.           Build all info files from texinfo source.
  80.  
  81.     `install-info'
  82.           Install all info files.
  83.  
  84.     `clean-info'
  85.           Remove all info files and any intermediate files that can be
  86.           generated from texinfo source.
  87.  
  88.     `Makefile'
  89.           Calls `./config.status' to rebuild the `Makefile' in this
  90.           directory.
  91.  
  92.    * The following `Makefile' targets have revised semantics:
  93.  
  94.     `install'
  95.           Should *not* depend on the target `all'.  If the program is
  96.           not already built, `make install' should fail.  This allows
  97.           you to install programs even when `make' would otherwise
  98.           determine them to be out of date.  This can happen, for
  99.           example, when the result of a `make all' is transported via
  100.           tape to another machine for installation.
  101.  
  102.     `clean'
  103.           Should remove any file that can be regenerated by the
  104.           `Makefile', excepting only the `Makefile' itself, and any
  105.           links created by `configure'.  That is, `make all clean'
  106.           should return all directories to their original condition.
  107.           If this is not done, then the command sequence
  108.  
  109.                configure HOST1 ; make all install clean ;
  110.                configure HOST2 ; make all install
  111.  
  112.           will fail because of intermediate files intended for HOST1.
  113.  
  114.    * Cygnus adds the following macros to all `Makefile.in' files, but
  115.      you are not required to use them to run Cygnus `configure'.
  116.  
  117.     `docdir'
  118.           The directory in which to install any documentation that is
  119.           not either a `man' page or an `info' file.  For `man' pages,
  120.           see `mandir'; for `info', see `infodir'.
  121.  
  122.     `includedir'
  123.           The directory in which to install any header files that
  124.           should be made available to users.  This is distinct from the
  125.           `gcc' include directory, which is intended for `gcc' only.
  126.           Files in `includedir' may be used by `cc' as well.
  127.  
  128.    * The following macros have revised semantics.  Most of them describe
  129.      installation directories; see also *Note Full description of all
  130.      installation subdirectories: Install details.
  131.  
  132.     `datadir'
  133.           is used for host independent data files.
  134.  
  135.     `mandir'
  136.           The default path for `mandir' depends on `prefix'.
  137.  
  138.     `infodir'
  139.           The default path for `infodir' depends on `prefix'.
  140.  
  141.     `BISON'
  142.           is assumed to have a `yacc' calling convention.  To use GNU
  143.           `bison', use `BISON=bison -y'.
  144.  
  145.    * Each Cygnus `Makefile' also conforms to one additional restriction:
  146.  
  147.      When libraries are installed, the line containing the call to
  148.      `INSTALL_DATA' should always be followed by a line containing a
  149.      call to `RANLIB' on the installed library.  This is to accommodate
  150.      systems that use `ranlib'.  Systems that do not use `ranlib' can
  151.      set `RANLIB' to "`echo'" in a host specific `Makefile' fragment.
  152.  
  153. 
  154. File: configure.info,  Node: Porting,  Next: Variables Index,  Prev: Using configure,  Up: Top
  155.  
  156. Porting with `configure'
  157. ************************
  158.  
  159.    This section explains how to add programs, host and target
  160. configuration names, and site-specific information to Cygnus
  161. `configure'.
  162.  
  163. * Menu:
  164.  
  165. * Programs::               Adding configure to new programs
  166. * Hosts and targets::      Adding hosts and targets
  167. * Sites::                  Adding site info
  168.  
  169. 
  170. File: configure.info,  Node: Programs,  Next: Hosts and targets,  Up: Porting
  171.  
  172. Adding `configure' to new programs
  173. ==================================
  174.  
  175.    If you are writing a new program, you probably shouldn't worry about
  176. porting or configuration issues until it is running reasonably on some
  177. host.  Then refer back to this section.
  178.  
  179.    If your program currently has a `configure' script that meets the GNU
  180. standards (*note How Configuration Should Work:
  181. (standards)Configuration., please do not add Cygnus `configure'.  It
  182. should be possible to add this program without change to a Cygnus
  183. `configure' style source tree.
  184.  
  185.    If the program is not target dependent, please consider using
  186. `autoconf' instead of Cygnus `configure'.  `autoconf' is available from
  187. the Free Software Foundation; it is a program which generates an
  188. executable shell script called `configure' by automatically finding
  189. information on the system to be configured on and embedding this
  190. information in the shell script.  `configure' scripts generated by
  191. `autoconf' require no arguments, and accept the same options as Cygnus
  192. `configure'.  For detailed instructions on using `autoconf', see *Note
  193. How to organize and produce Autoconf scripts: (autoconf)Making
  194. configure Scripts.
  195.  
  196.    To add Cygnus `configure' to an existing program, do the following:
  197.  
  198. *Make sure the `Makefile' conforms to the GNU standard
  199.      The coding standard for writing a GNU `Makefile' is described in
  200.      *Note Makefile Conventions: (standards)Makefiles.  For technical
  201.      information on writing a `Makefile', see *Note Writing Makefiles:
  202.      (make)Makefiles.
  203.  
  204. *Add Cygnus extensions to the `Makefile'
  205.      These are described in *Note Extensions to the GNU coding
  206.      standards: Makefile extensions.
  207.  
  208. *Collect package specific definitions in a single file
  209.      Many packages are best configured using a common `Makefile'
  210.      fragment which is included by all of the makefiles in the
  211.      different directories of the package.  In order to accomplish
  212.      this, set the variable `package_makefile_fragment' to the name of
  213.      the file.  It will be inserted into the final `Makefile' before
  214.      the target-specific fragment.
  215.  
  216. *Move host support from `Makefile' to fragments
  217.      This usually involves finding sections of the `Makefile' that say
  218.      things like "uncomment these lines for host HOSTTYPE" and moving
  219.      them to a new file called `./config/mh-HOSTTYPE'. For more
  220.      information, see *Note Adding hosts and targets: Hosts and targets.
  221.  
  222. *Choose defaults
  223.      If the program has compile-time options that determine the way the
  224.      program should behave, choose reasonable defaults and make these
  225.      `Makefile' variables.  Be sure the variables are assigned their
  226.      default values before the `####' line so that site-specific
  227.      `Makefile' fragments can override them (*note Extensions to the
  228.      GNU coding standards: Makefile extensions.).
  229.  
  230. *Locate configuration files
  231.      If there is configuration information in header files or source
  232.      files, separate it in such a way that the files have generic
  233.      names.  Then move the specific instances of those files into the
  234.      `./config/' subdirectory.
  235.  
  236. *Separate host and target information
  237.      Some programs already have this information separated.  If yours
  238.      does not, you will need to separate these two kinds of
  239.      configuration information.  "Host specific" information is the
  240.      information needed to compile the program.  "Target specific"
  241.      information is information on the format of data files that the
  242.      program will read or write.  This information should live in
  243.      separate files in the `./config/' subdirectory with names that
  244.      reflect the configuration for which they are intended.
  245.  
  246.      At this point you might skip this step and simply move on.  If you
  247.      do, you should end up with a program that can be configured only
  248.      to build "native" tools, that is, tools for which the host system
  249.      is also the target system.  Later, you could attempt to build a
  250.      cross tool and separate out the target-specific information by
  251.      figuring out what went wrong.  This is often simpler than combing
  252.      through all of the source code.
  253.  
  254. *Write `configure.in'
  255.      Usually this involves writing shell script fragments to map from
  256.      canonical configuration names into the names of the configuration
  257.      files.  These files will then be linked at configure time from the
  258.      specific instances of those files in `./config' to files in the
  259.      build directory with more generic names.  (See also *Note Build
  260.      directories: Build directories.)  The format of `configure.in' is
  261.      described in *Note The `configure.in' input file: configure.in.
  262.  
  263. *Rename `Makefile' to `Makefile.in'
  264.    At this point you should have a program that can be configured using
  265. Cygnus `configure'.
  266.  
  267. 
  268. File: configure.info,  Node: Hosts and targets,  Next: Sites,  Prev: Programs,  Up: Porting
  269.  
  270. Adding hosts and targets
  271. ========================
  272.  
  273.    To add a host or target to a program that already uses Cygnus
  274. `configure', do the following.
  275.  
  276.    * Make sure the new configuration name is represented in
  277.      `config.sub'.  If not, add it.  For more details, see the comments
  278.      in the shell script `config.sub'.
  279.  
  280.    * If you are adding a host configuration, look in `configure.in', in
  281.      the "per-host" section.  Make sure that your configuration name is
  282.      represented in the mapping from host configuration names to
  283.      configuration files.  If not, add it.  Also see *Note The
  284.      `configure.in' input file: configure.in.
  285.  
  286.    * If you are adding a target configuration, look in `configure.in',
  287.      in the "per-target" section.  Make sure that your configuration
  288.      name is represented in the mapping from target configuration names
  289.      to configuration files.  If not, add it.  Also see *Note The
  290.      `configure.in' input file: configure.in.
  291.  
  292.    * Look in `configure.in' for the variables `files', `links',
  293.      `host_makefile_frag', and `target_makefile_frag'.  The values
  294.      assigned to these variables are the names of the configuration
  295.      files, (relative to `srcdir') that the program uses.  Make sure
  296.      that copies of the files exist for your host.  If not, create
  297.      them.  See also *Note Variables available to `configure.in':
  298.      configure variables.
  299.  
  300.    This should be enough to `configure' for a new host or target
  301. configuration name.  Getting the program to compile and run properly
  302. represents the hardest work of any port.
  303.  
  304. 
  305. File: configure.info,  Node: Sites,  Prev: Hosts and targets,  Up: Porting
  306.  
  307. Adding site info
  308. ================
  309.  
  310.    If some of the `Makefile' defaults are not right for your site, you
  311. can build site-specific `Makefile' fragments.  To do this, do the
  312. following.
  313.  
  314.    * Choose a name for your site.  It must currently be less than
  315.      eleven characters.
  316.  
  317.    * If the program source does not have a `./config/' subdirectory,
  318.      create it.
  319.  
  320.    * Create a file called `./config/ms-SITE' where SITE is the name of
  321.      your site.  In it, set whatever `Makefile' variables you need to
  322.      override to match your site's conventions.
  323.  
  324.    * Configure the program with:
  325.  
  326.           configure ... --site=SITE
  327.  
  328. 
  329. File: configure.info,  Node: Variables Index,  Next: Concept Index,  Prev: Porting,  Up: Top
  330.  
  331. Variable Index
  332. **************
  333.  
  334. * Menu:
  335.  
  336. * bindir:                               Install details.
  337. * configdirs:                           configure variables.
  338. * disable-FEATURE:                      Invoking configure.
  339. * docdir:                               Install details.
  340. * enable-FEATURE:                       Invoking configure.
  341. * exec-prefix:                          Invoking configure.
  342. * exec_prefix:                          exec_prefix.
  343. * exec_prefix:                          Install details.
  344. * files:                                configure variables.
  345. * floating_point:                       configure variables.
  346. * gas:                                  configure variables.
  347. * host:                                 configure variables.
  348. * host_cpu:                             configure variables.
  349. * host_makefile_frag:                   configure variables.
  350. * host_os:                              configure variables.
  351. * host_vendor:                          configure variables.
  352. * includedir:                           Install details.
  353. * infodir:                              Install details.
  354. * libdir:                               Install details.
  355. * links:                                configure variables.
  356. * Makefile:                             configure variables.
  357. * manNdir:                              Install details.
  358. * manNext:                              Install details.
  359. * mandir:                               Install details.
  360. * nfp:                                  Invoking configure.
  361. * norecursion:                          Invoking configure.
  362. * package_makefile_frag:                configure variables.
  363. * prefix:                               prefix.
  364. * prefix:                               Install details.
  365. * prefix:                               Invoking configure.
  366. * program-prefix:                       Invoking configure.
  367. * removing:                             configure variables.
  368. * rm:                                   Invoking configure.
  369. * site:                                 Invoking configure.
  370. * site_makefile_frag:                   configure variables.
  371. * srcdir:                               configure variables.
  372. * srcdir:                               What configure does.
  373. * srcdir:                               Invoking configure.
  374. * srcname:                              configure variables.
  375. * srctrigger:                           configure variables.
  376. * subdirs:                              configure variables.
  377. * target:                               Invoking configure.
  378. * target:                               configure variables.
  379. * target_cpu:                           configure variables.
  380. * target_makefile_frag:                 configure variables.
  381. * target_os:                            configure variables.
  382. * target_vendor:                        configure variables.
  383. * tmpdir:                               Invoking configure.
  384. * verbose:                              Invoking configure.
  385. * with-PACKAGE:                         Invoking configure.
  386. * without-PACKAGE:                      Invoking configure.
  387.  
  388. 
  389. File: configure.info,  Node: Concept Index,  Prev: Variables Index,  Up: Top
  390.  
  391. Concept Index
  392. *************
  393.  
  394. * Menu:
  395.  
  396. * -disable-FEATURE:                     Invoking configure.
  397. * -enable-FEATURE:                      Invoking configure.
  398. * -exec-prefix:                         Invoking configure.
  399. * -help:                                Invoking configure.
  400. * -nfp:                                 Invoking configure.
  401. * -norecursion:                         Invoking configure.
  402. * -prefix:                              Invoking configure.
  403. * -program-prefix:                      Invoking configure.
  404. * -rm:                                  Invoking configure.
  405. * -site:                                Invoking configure.
  406. * -srcdir:                              Invoking configure.
  407. * -target:                              Invoking configure.
  408. * -tmpdir:                              Invoking configure.
  409. * -verbose:                             Invoking configure.
  410. * -version:                             Invoking configure.
  411. * -with-PACKAGE:                        Invoking configure.
  412. * -without-PACKAGE:                     Invoking configure.
  413. * -s:                                   Invoking configure.
  414. * -v:                                   Invoking configure.
  415. * .gdbinit:                             What configure does.
  416. * autoconf:                             Programs.
  417. * bindir:                               Install details.
  418. * config.guess:                         config.guess.
  419. * config.guess definition:              What configure really does.
  420. * config.status:                        config.status.
  421. * config.status:                        What configure does.
  422. * config.status definition:             What configure really does.
  423. * config.sub definition:                What configure really does.
  424. * config/ subdirectory:                 What configure really does.
  425. * configdirs:                           configure variables.
  426. * configure.in:                         configure.in.
  427. * configure.in definition:              What configure really does.
  428. * configure back end:                   What configure really does.
  429. * configure details:                    What configure really does.
  430. * disable-FEATURE option:               Invoking configure.
  431. * docdir:                               Install details.
  432. * enable-FEATURE option:                Invoking configure.
  433. * exec-prefix option:                   Invoking configure.
  434. * exec_prefix:                          Install details.
  435. * floating_point:                       configure variables.
  436. * help option:                          Invoking configure.
  437. * host:                                 configure variables.
  438. * includedir:                           Install details.
  439. * infodir:                              Install details.
  440. * libdir:                               Install details.
  441. * Makefile.in definition:               What configure really does.
  442. * Makefile extensions:                  Makefile extensions.
  443. * Makefile fragments:                   Makefile fragments.
  444. * Makefile generation:                  Makefile generation.
  445. * Makefile generation:                  What configure does.
  446. * manNdir:                              Install details.
  447. * manNext:                              Install details.
  448. * mandir:                               Install details.
  449. * nfp option:                           Invoking configure.
  450. * nfp option:                           configure variables.
  451. * norecursion option:                   Invoking configure.
  452. * prefix:                               Install details.
  453. * prefix option:                        Invoking configure.
  454. * prefix option:                        prefix.
  455. * program-prefix option:                Invoking configure.
  456. * rm option:                            Invoking configure.
  457. * rm option:                            configure variables.
  458. * site option:                          Invoking configure.
  459. * srcdir:                               configure variables.
  460. * srcdir:                               What configure does.
  461. * srcdir option:                        Invoking configure.
  462. * srcname:                              configure variables.
  463. * srctrigger:                           configure variables.
  464. * subdirs:                              configure variables.
  465. * s option:                             Invoking configure.
  466. * target:                               configure variables.
  467. * target option:                        Invoking configure.
  468. * tmpdir option:                        Invoking configure.
  469. * verbose option:                       Invoking configure.
  470. * v option:                             Invoking configure.
  471. * with-PACKAGE option:                  Invoking configure.
  472. * with-gnu-as option:                   configure variables.
  473. * without-PACKAGE option:               Invoking configure.
  474. * configure.in interface:               configure variables.
  475. * host shell-script fragment:           per-host.
  476. * per-host section:                     per-host.
  477. * per-host section:                     configure.in.
  478. * per-invocation section:               configure.in.
  479. * per-invocation section:               Declarations.
  480. * per-target section:                   configure.in.
  481. * per-target section:                   per-target.
  482. * post-target section:                  configure.in.
  483. * post-target section:                  post-target.
  484. * Abbreviating option names:            Invoking configure.
  485. * Adding configure to new programs:     Programs.
  486. * Adding hosts and targets:             Hosts and targets.
  487. * Adding local info:                    Makefile fragments.
  488. * Adding site info:                     Sites.
  489. * Adding site info:                     Makefile fragments.
  490. * Behind the scenes:                    What configure really does.
  491. * BISON:                                Makefile extensions.
  492. * Build directories:                    What configure does.
  493. * Build directories:                    Build directories.
  494. * Build variables:                      Build variables.
  495. * Building for multiple hosts:          Build directories.
  496. * Building for multiple targets:        Build directories.
  497. * Canonical "triple":                   configure variables.
  498. * Canonical "triple":                   configure variables.
  499. * Changing the install directory:       prefix.
  500. * clean:                                Makefile extensions.
  501. * clean-info:                           Makefile extensions.
  502. * Coding standards extensions:          Makefile extensions.
  503. * configure variables:                  configure variables.
  504. * Configuring for multiple hosts:       exec_prefix.
  505. * Cygnus extensions:                    Makefile extensions.
  506. * Cygnus Support Developer's Kit:       What configure does.
  507. * Cygnus Support Developer's Kit:       Build variables.
  508. * datadir:                              Makefile extensions.
  509. * Declarations section:                 Declarations.
  510. * Default configuration:                Makefile generation.
  511. * Detailed usage:                       Using configure.
  512. * docdir:                               Makefile extensions.
  513. * Example configure.in:                 Example.
  514. * Example session:                      Build directories.
  515. * Example session:                      Build directories.
  516. * Example session:                      exec_prefix.
  517. * Example session:                      Build variables.
  518. * Example session:                      Makefile extensions.
  519. * Example session:                      What configure really does.
  520. * Example session:                      Sites.
  521. * Example session:                      Invoking configure.
  522. * Example session:                      Invoking configure.
  523. * For each invocation:                  Declarations.
  524. * Host:                                 Host.
  525. * Host-specific instructions:           per-host.
  526. * Hosts and targets:                    Hosts and targets.
  527. * includedir:                           Makefile extensions.
  528. * info:                                 Makefile extensions.
  529. * infodir:                              Makefile extensions.
  530. * install:                              Makefile extensions.
  531. * Install details:                      Install details.
  532. * Install locations:                    Install locations.
  533. * install-info:                         Makefile extensions.
  534. * Installation subdirectories:          Install details.
  535. * Installing host-independent files:    exec_prefix.
  536. * Introduction:                         What configure does.
  537. * Invoking configure:                   Invoking configure.
  538. * Local conventions:                    Makefile fragments.
  539. * Makefile:                             Makefile extensions.
  540. * mandir:                               Makefile extensions.
  541. * Minimal configure.in example:         Minimal.
  542. * Object directories:                   Build directories.
  543. * Other files:                          What configure really does.
  544. * Overview:                             What configure does.
  545. * Porting with configure:               Porting.
  546. * Post-target shell-script fragment:    post-target.
  547. * Recursion:                            What configure does.
  548. * Sample configure.in:                  Example.
  549. * Sharing host-independent files:       exec_prefix.
  550. * Sites:                                Sites.
  551. * Subdirectories:                       Install details.
  552. * Symbolic links:                       What configure does.
  553. * Symbolic links:                       configure variables.
  554. * Symbolic links:                       configure variables.
  555. * Target:                               Target.
  556. * target shell-script fragment:         per-target.
  557. * Target-specific instructions:         per-target.
  558. * The exec_prefix directory:            exec_prefix.
  559. * Truncating option names:              Invoking configure.
  560. * Usage:                                Invoking configure.
  561. * Usage:                                Invoking configure.
  562. * Usage: detailed:                      Using configure.
  563. * Using configure:                      Using configure.
  564. * Variables:                            Build variables.
  565. * Verbose Output:                       Invoking configure.
  566. * version:                              Invoking configure.
  567. * version:                              Invoking configure.
  568. * What configure does:                  What configure does.
  569. * What configure really does:           What configure really does.
  570. * Where to install:                     Install locations.
  571.  
  572.  
  573.